package scene;

public class Material {
	public Color amb;
	public Color dif;
	public Color spec;
	public float phong;
	public Color trans;
	public float ior;

	public Material(Color amb, Color dif, Color spec, float phong, Color trans, float ior) {
		this.amb = amb;
		this.dif = dif;
		this.spec = spec;
		this.phong = phong;
		this.trans = trans;
		this.ior = ior;
	}

	public Material() {
		this.amb = new Color();
		this.dif = new Color();
		this.spec = new Color();
		this.phong = 0.0f;
		this.trans = new Color();
		this.ior = 1.0f;
	}

	@Override
	public String toString() {
		return "a" + amb + " d" + dif + " s" + spec + " p" + phong + " t" + trans + " r" + ior;
	}

	@Override
	public boolean equals(Object obj) {
		Material m = (Material) obj;
		return m.amb.equals(this.amb) && m.dif.equals(this.dif) && m.spec.equals(this.spec) && m.trans.equals(this.trans) && m.phong == this.phong && m.ior == this.ior;
	}
}
